/**
 * Created by reesoft on 2017/6/15.
 */

var URL = {
    getQueryString: function (name) {
        var regex = new RegExp("[\\?|&]" + name + "=([^&]*)(&|$)", "i");
        var match = window.location.search.match(regex);
        if (match && match.length > 0) {
            return decodeURIComponent(match[1]);
        }
        return null;
    },
    getParam: function (name) {
        return this.getQueryString(name);
    }
};
